﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AuthorizeList.ascx.cs"
    Inherits="VDC.VONE.WEB.Modules.Authorize.Controls.AuthorizeList" %>
<%@ Import Namespace="VDC.COMMON" %>
<table class="tbl_data" width="97%" cellspacing="0" cellpadding="0" align="center">
    <tr>
        <th align="left" valign="middle" style="border-right: 0px; padding-left: 8px" class="tab_selected">
            <img width="24" height="26" align="absmiddle" style="padding-right: 8px;" alt=""
                src='<%=this.ResolveUrl("~/Images/note.png") %>'>
            <asp:Label runat="server" ID="lblHeader" Text="ỦY QUYỀN" />
        </th>
    </tr>
    <tr style="height: 30px; width: 98%;">
        <td>
            <div style="float: left; margin-left: 10px;">
                <asp:Label ID="lblMessage" EnableViewState="False" runat="server" /></div>
            <span style="float: right; margin-right: 10px;">
                <asp:Label ID="lblSum" runat="server" Text="Tổng số : " Font-Bold="True"></asp:Label>
                <asp:Label ID="lblCount" runat="server" Text="30"></asp:Label>
            </span>
        </td>
    </tr>
    <tr>
        <td align="center">
            <asp:GridView ID="GrdAuthorize" CssClass="grid_hs_tbl" CellPadding="0" CellSpacing="0"
                GridLines="None" DataKeyNames="AuthorizeId" AutoGenerateColumns="False"
                Width="98%" runat="server" OnPageIndexChanging="GrdAuthorize_PageIndexChanging"
                OnRowDataBound="GrdAuthorize_RowDataBound" OnRowEditing="GrdAuthorize_RowEditing"
                PagerSettings-PageButtonCount="5" AllowPaging="True" OnRowDeleting="GrdAuthorize_RowDeleting"
                OnDataBound="GrdAuthorize_DataBound" ShowHeaderWhenEmpty="True">
                <Columns>
                    <asp:TemplateField HeaderText="STT">
                        <HeaderStyle CssClass="grid_hs" HorizontalAlign="Center" Width="4%"></HeaderStyle>
                        <ItemTemplate>
                            <%# Container.DataItemIndex + 1 %>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center"></ItemStyle>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Người ủy quyền" SortExpression="Parent">
                        <HeaderStyle CssClass="grid_hs" Width="16%" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <%# PublicFuncs.HtmlEncode(Eval("AuthorizeUser.FullName"))%>
                        </ItemTemplate>
                         <ItemStyle HorizontalAlign="Left"></ItemStyle>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Người được<br/>ủy quyền" SortExpression="Parent">
                        <HeaderStyle CssClass="grid_hs" Width="16%" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <%# PublicFuncs.HtmlEncode(Eval("AuthorizeBeenUser.FullName"))%>
                        </ItemTemplate>
                         <ItemStyle HorizontalAlign="Left"></ItemStyle>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Phòng ban" SortExpression="Parent">
                        <HeaderStyle CssClass="grid_hs" Width="15%" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <%# PublicFuncs.HtmlEncode(Eval("Department.Name"))%>
                        </ItemTemplate>
                         <ItemStyle HorizontalAlign="Left"></ItemStyle>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Chức vụ" SortExpression="Parent">
                        <HeaderStyle CssClass="grid_hs" Width="15%" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <%# PublicFuncs.HtmlEncode(Eval("Position.Name"))%>
                        </ItemTemplate>
                         <ItemStyle HorizontalAlign="Left"></ItemStyle>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Ngày ủy<br/>quyền">
                        <HeaderStyle CssClass="grid_hs" Width="8%" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <%#Eval("Date","{0:dd/MM/yyyy}")%>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Left"></ItemStyle>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Ngày bắt<br/>đầu">
                        <HeaderStyle CssClass="grid_hs" Width="8%" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <%#Eval("StartDate", "{0:dd/MM/yyyy}")%>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Left"></ItemStyle>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Ngày kết<br/>thúc">
                        <HeaderStyle CssClass="grid_hs" Width="8%" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <%#Eval("EndDate", "{0:dd/MM/yyyy}")%>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Left"></ItemStyle>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Xóa">
                        <HeaderStyle CssClass="grid_hs" Width="5%" HorizontalAlign="Center"></HeaderStyle>
                        <ItemTemplate>
                            <asp:ImageButton ID="imgDelete" runat="server" AlternateText="Delete" ToolTip="Delete Item"
                                CommandArgument='<%# Eval("AuthorizeId") %>' CommandName="Delete" ImageUrl="~/Images/imgDelete.gif"
                                OnClientClick=" return confirm('Bạn có chắc chắn muốn xóa?'); " />
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" Width="5%" />
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                </Columns>
                <PagerStyle HorizontalAlign="Right" BackColor="#FFFFFF"></PagerStyle>
                <PagerTemplate>
                    <table id="paging">
                        <tr>
                            <td>
                                <div class="Portalpages">
                                    <asp:PlaceHolder ID="pageHolder" runat="server"></asp:PlaceHolder>
                                </div>
                            </td>
                        </tr>
                    </table>
                </PagerTemplate>
            </asp:GridView>
        </td>
    </tr>
    <tr>
        <td style="padding-left: 8px;">
            <asp:Button ID="BtnAdd" runat="server" CssClass="css_button default" Text="Tạo mới"
                OnClick="BtnAdd_Click" />
        </td>
    </tr>
    <tr>
        <td>
            &nbsp;
        </td>
    </tr>
</table>
